using System;

namespace DesignPrinciples.OCPSolution
{
    public class WeatherDisplayOCP
    {
        private readonly IDisplayTemperature _displayTemperature;
        private readonly IDisplayWindSpeed _displayWindSpeed;


        public WeatherDisplayOCP(IDisplayTemperature displayTemperature, IDisplayWindSpeed displayWindSpeed)
        {
            _displayTemperature = displayTemperature;
            _displayWindSpeed = displayWindSpeed;
        }

        public void DisplayWeather()
        {
            Console.WriteLine(_displayTemperature.Temperature());
            Console.WriteLine(_displayWindSpeed.WindSpeed());
        }
    }
}
